package com.isunland.managesystem.ui;

import android.content.Context;
import com.isunland.managesystem.R;
import com.isunland.managesystem.base.BaseShadowListAdapter;
import com.isunland.managesystem.entity.EmployeeLoanContent;
import com.isunland.managesystem.utils.MyUtils;
import java.util.List;

//public class DepartmentCollectListAdapter extends BaseStatusListAdapter<EmployeeLoanContent>{
//
//	public DepartmentCollectListAdapter(Context context, List<EmployeeLoanContent> objects) {
//		super(context, objects);
//	}
//
//	@Override
//	public void bindData(int position, ViewHolder vh,EmployeeLoanContent item) {
//		vh.mTvTitle.setText(item.getExpenseDesc());
//		//填报人
//		String name="";
//		if (!TextUtils.isEmpty(item.getApplicantName())) {
//			name=item.getApplicantName();
//		}else {
//			if (!TextUtils.isEmpty(item.getReceiverName())) {
//				name=item.getReceiverName();
//			}else {
//				if (!TextUtils.isEmpty(item.getDraweeName())) {
//					name=item.getDraweeName();
//				}else {
//					name="";
//				}
//			}
//		}
//		vh.mTvContent.setText(name);
//		vh.mTvContentTwo.setText(item.getApplyTime());
//		vh.mTvStatus.setVisibility(View.GONE);
//	}
//}
public class DepartmentCollectListAdapter extends BaseShadowListAdapter<EmployeeLoanContent> {

  public DepartmentCollectListAdapter(Context context, List<EmployeeLoanContent> objects) {
    super(context, objects);
  }

  public DepartmentCollectListAdapter(Context context, EmployeeLoanContent[] objects) {
    super(context, objects);
  }

  @Override public void bindData(int position, ViewHolder vh, EmployeeLoanContent item) {
    MyUtils.switchShadowStutus(getContext(), vh.mContentStatusTv, item.getDataStatus());
    vh.mContentTwoTv.setText(item.getCertificateNo());
    vh.mContentTwoTv.setTextColor(getContext().getResources().getColor(R.color.chocolate));
    vh.mContentThreeTv.setText(item.getExpenseDesc());
    vh.mPersonNameTv.setText(item.getApplicantName());
    vh.mPersonDataTv.setText(item.getApplyTime());
  }
}